package com.atgugui.eduservice.client;

import com.atgugui.commonutils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;


import java.util.List;

/**
 * 将eduvod模块中的相关接口注册进来
 */
@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodServiceClient {

    @ApiOperation(value = "service-vod模块中根据id删除视频接口")
    @DeleteMapping("/eduvod/video/deleteVideo/{videoId}")
    Result deleteVideoByVideoId(@PathVariable("videoId") String videoId);

    @ApiOperation(value = "service-vod模块中批量删除视频接口")
    @DeleteMapping("/eduvod/video/delete-batch")
    Result deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
